gtk4.git
11 years agoGdkGLContext: Add display property
Alexander Larsson [Mon, 3 Nov 2014 12:20:55 +0000 (13:20 +0100)]
GdkGLContext: Add display property

We need to use this in the code path where we make the context
non-current during destroy, because at that point the window
could be destroyed and gdk_window_get_display() would return
NULL.

11 years agoGtkGLArea: Don't dispose gl context on unrealize
Alexander Larsson [Mon, 3 Nov 2014 12:19:40 +0000 (13:19 +0100)]
GtkGLArea: Don't dispose gl context on unrealize

This was done to ensure the context is not current, but this is
pretty broken for shared contexts. We now just make it non-current.

11 years agoGtkGLArea: Add create-context signal
Alexander Larsson [Mon, 3 Nov 2014 09:43:31 +0000 (10:43 +0100)]
GtkGLArea: Add create-context signal

This lets you hook into the GL context creation which is useful
if you want to share one GL context between GtkGLArea widgets.

11 years agoOnly warn once if inhibit-related dbus calls fail
Matthias Clasen [Mon, 3 Nov 2014 05:48:42 +0000 (00:48 -0500)]
Only warn once if inhibit-related dbus calls fail

No need to spam about it.

https://bugzilla.gnome.org/show_bug.cgi?id=734140

11 years agoGtkIconTheme: Improve an error message
Matthias Clasen [Mon, 3 Nov 2014 05:25:14 +0000 (00:25 -0500)]
GtkIconTheme: Improve an error message

Mention the name of the theme when an icon lookup fails.
https://bugzilla.gnome.org/show_bug.cgi?id=687963

11 years agoGtkFileChooser: Add a menuitem for 'sort directories first'
Matthias Clasen [Mon, 3 Nov 2014 05:02:13 +0000 (00:02 -0500)]
GtkFileChooser: Add a menuitem for 'sort directories first'

This has been requested repeatedly.

11 years agogtkmenu: fix unnecessary scroll buttons
Alberts Muktupāvels [Fri, 31 Oct 2014 01:10:13 +0000 (03:10 +0200)]
gtkmenu: fix unnecessary scroll buttons

Don't change menu height if menu is out of monitor only by shadow
width.

https://bugzilla.gnome.org/show_bug.cgi?id=738321

11 years agoAdwaita: add borders to menus in a non composited env
Lapo Calamandrei [Wed, 22 Oct 2014 18:46:54 +0000 (20:46 +0200)]
Adwaita: add borders to menus in a non composited env

https://bugzilla.gnome.org/show_bug.cgi?id=738800

11 years agoGtkHeaderBar: Fix a corner-case in child properties
Matthias Clasen [Sun, 2 Nov 2014 22:46:35 +0000 (17:46 -0500)]
GtkHeaderBar: Fix a corner-case in child properties

The child property setting must be prepared to deal with any
child property for any child, even if it doesn't make sense,
like the pack-type for the custom title. This is happening
in glade when undoing a change in the custom-title property.

11 years agoUpdated Greek translation
Dimitris Spingos [Sun, 2 Nov 2014 08:52:52 +0000 (10:52 +0200)]
Updated Greek translation

11 years agocsd: Improve appearance inside glade
Matthias Clasen [Sat, 1 Nov 2014 18:49:02 +0000 (14:49 -0400)]
csd: Improve appearance inside glade

glade turns windows into non-toplevels, so we can easily recognize
that situation and avoid adding a humongous shadow area.

11 years agoFix an ordering issue in event destruction
Matthias Clasen [Sat, 1 Nov 2014 18:44:03 +0000 (14:44 -0400)]
Fix an ordering issue in event destruction

gdk_event_get_display accesses event->any.window, so don't
free that window first thing.

11 years agoGtkVolumeButton: Fix annoying double formatting
Matthias Clasen [Sat, 1 Nov 2014 17:18:33 +0000 (13:18 -0400)]
GtkVolumeButton: Fix annoying double formatting

We meant to specify 0.2, and it came out as 0.2000000001.

11 years agoglade: Add GtkColorEditor to private widgets
Matthias Clasen [Sat, 1 Nov 2014 17:18:17 +0000 (13:18 -0400)]
glade: Add GtkColorEditor to private widgets

11 years agoglade: Drop a no-longer existing private widget
Matthias Clasen [Sat, 1 Nov 2014 17:15:20 +0000 (13:15 -0400)]
glade: Drop a no-longer existing private widget

GtkScaleButtonScale fell by the wayside when the scale button
was ported to a popover.

11 years agoradiobutton: don't consider hidden buttons in the group for focus
Cosimo Cecchi [Fri, 31 Oct 2014 00:02:45 +0000 (17:02 -0700)]
radiobutton: don't consider hidden buttons in the group for focus

When a GtkRadioButton has no focus, it will accept it when there is no
other active button in its group.
If the active button in the group is hidden, for example because the UI
desires not to have a default option pre-selected, currently the focus
will not be accepted, which is not desired behavior.

This commit changes the code to only consider visible buttons in the
group when checking whether another button is active.

https://bugzilla.gnome.org/show_bug.cgi?id=739474

11 years agoGtkListBox: Fix a bug in unselection
Matthias Clasen [Sat, 1 Nov 2014 02:34:09 +0000 (22:34 -0400)]
GtkListBox: Fix a bug in unselection

Ensure that gtk_list_box_get_selected_row returns NULL after
gtk_list_box_unselect_all. Add a testcase that detects this
problem.

11 years agoicon-browser: Add search
Matthias Clasen [Sat, 1 Nov 2014 02:28:17 +0000 (22:28 -0400)]
icon-browser: Add search

Most of the code was already in place, just some loose ends
to fix up.

11 years agoinspector: Search refinements
Matthias Clasen [Sat, 1 Nov 2014 01:14:09 +0000 (21:14 -0400)]
inspector: Search refinements

Show close buttons on all search bars.

11 years agoinspector: Refine object tree search
Matthias Clasen [Sat, 1 Nov 2014 01:13:18 +0000 (21:13 -0400)]
inspector: Refine object tree search

Behave similar to traditional treeview search, and center
the row when moving between matches.

11 years agoinspector: Add search to the object tree
Matthias Clasen [Fri, 31 Oct 2014 18:16:39 +0000 (14:16 -0400)]
inspector: Add search to the object tree

This is also an attempt to figure out a better story for search
in treeviews.

11 years agoTrivial: sort file list alphabetically
Matthias Clasen [Fri, 31 Oct 2014 18:16:02 +0000 (14:16 -0400)]
Trivial: sort file list alphabetically

11 years agoAdwaita: special case .default-decoration
Lapo Calamandrei [Fri, 31 Oct 2014 15:53:23 +0000 (16:53 +0100)]
Adwaita: special case .default-decoration

Titlebars which are just window handles can be smaller.

11 years agoAdwaita: simpler gtkcalendar style (once again)
Lapo Calamandrei [Fri, 31 Oct 2014 15:44:21 +0000 (16:44 +0100)]
Adwaita: simpler gtkcalendar style (once again)

11 years agoinspector: Improve search in style property list
Matthias Clasen [Fri, 31 Oct 2014 00:54:54 +0000 (20:54 -0400)]
inspector: Improve search in style property list

Use a search bar with a search entry instead of the builtin
treeview search popup.

11 years agoinspector: Improve search in property list
Matthias Clasen [Fri, 31 Oct 2014 00:54:04 +0000 (20:54 -0400)]
inspector: Improve search in property list

Use a search bar with a search entry instead of the builtin
treeview search popup.

11 years agoinspector: Stop overeager activation
Matthias Clasen [Thu, 30 Oct 2014 22:47:46 +0000 (18:47 -0400)]
inspector: Stop overeager activation

Stop using activate-on-single click for the property list -
it is a little annoying to have the popover come up when you
just click in the list to get the focus there.

11 years agoGdkGLArea: fix has_alpha changes at runtime
Alexander Larsson [Thu, 30 Oct 2014 19:00:45 +0000 (20:00 +0100)]
GdkGLArea: fix has_alpha changes at runtime

We need to completely reallocate the buffers if we switch
has_alpha, because we may switch from render buffers to
texture.

11 years agoGtkGLArea: Add resize signal
Alexander Larsson [Thu, 30 Oct 2014 18:49:43 +0000 (19:49 +0100)]
GtkGLArea: Add resize signal

This is very useful, as almost all GL code wants to recalculate
the cameras each time the window size changes.

11 years agoGtkGLArea: Add profile property
Alexander Larsson [Thu, 30 Oct 2014 18:18:05 +0000 (19:18 +0100)]
GtkGLArea: Add profile property

This lets you force a core 3.2 context if you want

11 years agoGtkGLArea: Add INPUT_ONLY window so that we can get events
Alexander Larsson [Thu, 30 Oct 2014 17:51:40 +0000 (18:51 +0100)]
GtkGLArea: Add INPUT_ONLY window so that we can get events

11 years agoGtkGLArea: Major reworking
Alexander Larsson [Thu, 30 Oct 2014 17:22:44 +0000 (18:22 +0100)]
GtkGLArea: Major reworking

This restructures the way buffers are allocated and bound in a way
that is more flexible.

Buffer operation happens in three phases:
create_buffer() - Creates the gl objects
allocate_buffers() - Allocates space for the buffers at a given size
attach_buffers() - Attaches the buffers to the framebuffer and makes
                   the framebuffer the default drawing target
And destroy via
delete_buffers()

We call all these the first draw, and after that we allocate buffers
each time the widget changes size until the buffers are deleted.
We delete the buffers at unrealize.

However, anyone that wants to manually control buffer allocation strategies
can manually call allocate/delete_buffers().

There are also some other changes:
* Support for stencil buffers.
* A manual render mode where ::draw doesn't render unless you manually
  invalidated the previous rendering.

11 years agogdk_x11_display_make_gl_context_current: move some code
Alexander Larsson [Thu, 30 Oct 2014 15:04:28 +0000 (16:04 +0100)]
gdk_x11_display_make_gl_context_current: move some code

This moves the code related to the frame sync code into
the is_attached check, which means we don't have to ever
run this when making non-window-paint contexts current.

This is a minior speed thing, but the main advantage
is that it makes making a non-paint context current
threadsafe.

11 years agoAdwaita: darken a bit OSD background color
Lapo Calamandrei [Thu, 30 Oct 2014 17:41:45 +0000 (18:41 +0100)]
Adwaita: darken a bit OSD background color

To not make it vanish on dark variant background color.

11 years agoImprove warning
Matthias Clasen [Thu, 30 Oct 2014 17:41:13 +0000 (13:41 -0400)]
Improve warning

Mention the file that we're failing to load. That makes it obvious
what is wrong.

11 years agoinspector: Add HighContrast to built-in themes list
Matthias Clasen [Thu, 30 Oct 2014 16:50:09 +0000 (12:50 -0400)]
inspector: Add HighContrast to built-in themes list

11 years agoHighContrast: integrate in build machinery
Matthias Clasen [Thu, 30 Oct 2014 16:48:56 +0000 (12:48 -0400)]
HighContrast: integrate in build machinery

11 years agoDrop gtk.gresource.xml
Matthias Clasen [Thu, 30 Oct 2014 16:47:53 +0000 (12:47 -0400)]
Drop gtk.gresource.xml

Theme resources are controlled from the (generated) .gresource.xml
file two stories up.

11 years agoHighContrast: Add sass parsing script
Matthias Clasen [Thu, 30 Oct 2014 15:34:32 +0000 (11:34 -0400)]
HighContrast: Add sass parsing script

Just a copy of what we have next door in Adwaita.

11 years agoHighContrast: Drop settings.ini
Matthias Clasen [Thu, 30 Oct 2014 15:32:23 +0000 (11:32 -0400)]
HighContrast: Drop settings.ini

The only setting in there is already the default behavior,
and the setting is deprecated and ignored anyway.

11 years agoAdwaita: slightly contrasting popover background
Lapo Calamandrei [Thu, 30 Oct 2014 12:21:13 +0000 (13:21 +0100)]
Adwaita: slightly contrasting popover background

11 years agoAdwaita: border radiusses rationalization
Lapo Calamandrei [Thu, 30 Oct 2014 12:18:48 +0000 (13:18 +0100)]
Adwaita: border radiusses rationalization

11 years agoUpdated POTFILES.in
Piotr Drąg [Thu, 30 Oct 2014 16:21:40 +0000 (17:21 +0100)]
Updated POTFILES.in

11 years agotheme: move HC theme from gnome-themes-standard
Jakub Steiner [Thu, 30 Oct 2014 15:14:37 +0000 (16:14 +0100)]
theme: move HC theme from gnome-themes-standard

- HC is part of the toolkit the same way as Adwaita is
- No automake foo included

11 years agoAdd GdkGLContext::profile
Alexander Larsson [Thu, 30 Oct 2014 11:42:37 +0000 (12:42 +0100)]
Add GdkGLContext::profile

11 years agoClarify docs for gdk_cairo_draw_from_gl
Alexander Larsson [Thu, 30 Oct 2014 11:22:08 +0000 (12:22 +0100)]
Clarify docs for gdk_cairo_draw_from_gl

11 years agoRemove GdkGLContext::visual
Alexander Larsson [Thu, 30 Oct 2014 11:15:51 +0000 (12:15 +0100)]
Remove GdkGLContext::visual

This is not really needed. The gl context is totally tied to the
window it is created from by virtue of sharing the context with the
paint context of that window and that context always has the visual
of the window (which we already can get).

Also, all user visible contexts are essentially offscreen contexts, so
a visual doesn't make sense for them. They only use FBOs which have
whatever format that the users sets up.

11 years agoGtkGLArea: Always destroy context on unrealize
Alexander Larsson [Thu, 30 Oct 2014 11:08:31 +0000 (12:08 +0100)]
GtkGLArea: Always destroy context on unrealize

We had some code that tried to reuse the context over realize, but
that doesn't work as we need to share with the possibly new
paint context of the re-realized window.

11 years agoGdkWindow: destroy paint gl context on destroy
Alexander Larsson [Thu, 30 Oct 2014 11:07:39 +0000 (12:07 +0100)]
GdkWindow: destroy paint gl context on destroy

11 years agoGdkGLContext: Track shared context
Alexander Larsson [Thu, 30 Oct 2014 11:04:23 +0000 (12:04 +0100)]
GdkGLContext: Track shared context

This allows us to read it back, but primarily it ensures
the shared context wrapper stays alive as long as the context.

11 years agoGdkGLContext: Change the way we track the current context
Alexander Larsson [Thu, 30 Oct 2014 10:46:09 +0000 (11:46 +0100)]
GdkGLContext: Change the way we track the current context

To properly support multithreaded use we use a global GPrivate
to track the current context. Since we also don't need to track
the current context on the display we move gdk_display_destroy_gl_context
to GdkGLContext::discard.

11 years agoAdwaita: osd rationalization and tweakings
Lapo Calamandrei [Thu, 30 Oct 2014 10:50:27 +0000 (11:50 +0100)]
Adwaita: osd rationalization and tweakings

Removed bright translucent outer border for "top level" osd widgets,
insensitive osd entry styled, more meaningfull color variables and
some code rationalization.

11 years agoGdkWindowX11: Keep the impl window cairo surface around until destroy
Alexander Larsson [Thu, 30 Oct 2014 09:30:33 +0000 (10:30 +0100)]
GdkWindowX11: Keep the impl window cairo surface around until destroy

We used to have a weak ref to the cairo surface and it was keep
alive by the references in the normal windows, but that reference
was removed by d48adf9cee7e340acd7f8b9a5f9716695352b848, causing
us to constantly create and destroy the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=738648

11 years agoMake the inspector window translucent instead of lowering
Matthias Clasen [Tue, 28 Oct 2014 03:51:17 +0000 (23:51 -0400)]
Make the inspector window translucent instead of lowering

Make the inspector window click-through and see-through
when we can, instead of lowering it. This is useful, since
Wayland has no lowering.

11 years agoAdwaita: fix for the previous colorswatch fix...
Lapo Calamandrei [Wed, 29 Oct 2014 18:54:43 +0000 (19:54 +0100)]
Adwaita: fix for the previous colorswatch fix...

Make the selected colorswatch inhert on backdrop.

11 years agoAdwaita: fix selected colorswatch white border
Lapo Calamandrei [Wed, 29 Oct 2014 18:50:58 +0000 (19:50 +0100)]
Adwaita: fix selected colorswatch white border

11 years agoAdwaita: first round of OSD style converage
Lapo Calamandrei [Wed, 29 Oct 2014 17:10:39 +0000 (18:10 +0100)]
Adwaita: first round of OSD style converage

Some code refactoring, entry and spinbuttons and flat buttons
styled, more to come...

11 years agowayland: Emit GDK_OWNER_CHANGE events around wl_data_offer changes
Carlos Garnacho [Wed, 29 Oct 2014 16:31:15 +0000 (17:31 +0100)]
wayland: Emit GDK_OWNER_CHANGE events around wl_data_offer changes

This way the upper GtkClipboard code emits correctly ::owner-change when
receiving these events.

11 years agoGdkX11GLContext: Fix leak
Alexander Larsson [Wed, 29 Oct 2014 12:52:04 +0000 (13:52 +0100)]
GdkX11GLContext: Fix leak

11 years agoCache default gdk visuals in the GDK_VISUALS property on the root window
Alexander Larsson [Wed, 29 Oct 2014 12:33:08 +0000 (13:33 +0100)]
Cache default gdk visuals in the GDK_VISUALS property on the root window

This means we don't have to try to initialize opengl in every gtk
instance that is stated. It will only happen for the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=738670

11 years agoX11: Pick better system and rgba visuals for GL
Alexander Larsson [Wed, 29 Oct 2014 11:35:07 +0000 (12:35 +0100)]
X11: Pick better system and rgba visuals for GL

We want to create windows with the default visuals such that we then
have the right visual for GLX when we want to create the paint GL
context for the window.

For instance, (in bug 738670) the default rgba visual we picked for the
NVidia driver had an alpha size of 0 which gave us a BadMatch when later
trying to initialize a gl context on it with a alpha FBConfig.

Instead of just picking what the Xserver likes for the default, and just
picking the first rgba visual we now actually call into GLX to pick
an appropriate visual.

11 years agoRemove a redundant call
Matthias Clasen [Wed, 29 Oct 2014 10:42:08 +0000 (06:42 -0400)]
Remove a redundant call

No need to set shapes twice in a row.

11 years agoGtkPopoverMenu: Add API to open a submenu
Matthias Clasen [Sun, 26 Oct 2014 23:14:01 +0000 (19:14 -0400)]
GtkPopoverMenu: Add API to open a submenu

This allows alternative menu switching to be implemented, besides
the builtin GtkModelButton support.

11 years agoAdd a scale to the popover menu example
Matthias Clasen [Sun, 26 Oct 2014 23:11:33 +0000 (19:11 -0400)]
Add a scale to the popover menu example

Demonsttrate that this is flexible enough for the intended uses.

11 years agoAdd documentation
Matthias Clasen [Sun, 26 Oct 2014 23:04:28 +0000 (19:04 -0400)]
Add documentation

Document GtkModelButton and GtkPopoverMenu.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 13:08:37 +0000 (09:08 -0400)]
Adapt the testpopover example

Add the required boxes for each submenu. We now need to specify the
submenu name only once per submenu.

11 years agoGtkPopoverMenu: Simplify
Matthias Clasen [Sun, 26 Oct 2014 22:58:55 +0000 (18:58 -0400)]
GtkPopoverMenu: Simplify

Change things so each submenu is a single child, and users are
required to create the box themselves.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 22:13:29 +0000 (18:13 -0400)]
Adapt the testpopover example

Drop all all explicit role setting from the testpopover example.

11 years agoGtkModelButton: Don't require an explicit role
Matthias Clasen [Sun, 26 Oct 2014 22:13:02 +0000 (18:13 -0400)]
GtkModelButton: Don't require an explicit role

When we have an action-name, we can deduce the role from the
action that is looked up by the action helper.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 22:10:23 +0000 (18:10 -0400)]
Adapt the testpopover example

11 years agoGtkModelButton: Rename action-role to role
Matthias Clasen [Sun, 26 Oct 2014 22:08:26 +0000 (18:08 -0400)]
GtkModelButton: Rename action-role to role

Rename action-role to role, and make all properties readable.

11 years agoGtkModelButton: Drop unused :accel property
Matthias Clasen [Sun, 26 Oct 2014 03:30:12 +0000 (23:30 -0400)]
GtkModelButton: Drop unused :accel property

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 20:23:50 +0000 (16:23 -0400)]
Adapt the testpopover example

Drop all uses of has-submenu.

11 years agoDrop GtkModelButton:has-submenu
Matthias Clasen [Sun, 26 Oct 2014 20:23:31 +0000 (16:23 -0400)]
Drop GtkModelButton:has-submenu

Replace the has-submenu property with checking menu-name != NULL.

11 years agoAdapt the testpopover example
Matthias Clasen [Fri, 24 Oct 2014 03:39:39 +0000 (23:39 -0400)]
Adapt the testpopover example

We now use GtkPopoverMenu, and just add the model buttons
directly to it.

11 years agoGtkModelButton: Add a menu-name property
Matthias Clasen [Fri, 24 Oct 2014 03:38:46 +0000 (23:38 -0400)]
GtkModelButton: Add a menu-name property

Add a menu-name property and use it in a default implementation
of ::clicked to switch menus if we are inside a stack. This means
GtkModelButton is no longer entirely generic, but rather expects
to be used inside a GtkPopoverMenu. It still works in other contexts
too, of course.

11 years agoAdd GtkPopoverMenu
Matthias Clasen [Fri, 24 Oct 2014 03:38:09 +0000 (23:38 -0400)]
Add GtkPopoverMenu

GtkPopoverMenu is a GtkPopover subclass that has a menu-like stack
built-in.

11 years agoAdd a manual popover menu example
Matthias Clasen [Fri, 24 Oct 2014 01:55:20 +0000 (21:55 -0400)]
Add a manual popover menu example

Reproduce the testpopover popover manually, by packing model
buttons into a stack in a popover.

11 years agoMake GtkModelButton a better GtkActionable
Matthias Clasen [Fri, 24 Oct 2014 01:43:28 +0000 (21:43 -0400)]
Make GtkModelButton a better GtkActionable

Rename the "toggled" property to "active", since that is what
GtkActionHelper expects to update for check and radio actions.
Also make the property readable, since GtkActionHelper wants
to read it.

11 years agoMake GtkModelButton public
Matthias Clasen [Fri, 24 Oct 2014 01:31:17 +0000 (21:31 -0400)]
Make GtkModelButton public

11 years agoDrop an unused variable
Matthias Clasen [Wed, 29 Oct 2014 02:36:50 +0000 (22:36 -0400)]
Drop an unused variable

11 years agoGdkGLContextX11: Don't free NULL visual info
Alexander Larsson [Wed, 29 Oct 2014 10:25:21 +0000 (11:25 +0100)]
GdkGLContextX11: Don't free NULL visual info

11 years agoFix toplevel input shape for csd windows
Matthias Clasen [Wed, 29 Oct 2014 00:23:47 +0000 (20:23 -0400)]
Fix toplevel input shape for csd windows

We need to maintain the application-set and the the csd
input shape separately, and intersect them to pass them
down.

11 years agoPlug another memory leak
Matthias Clasen [Tue, 28 Oct 2014 20:07:25 +0000 (16:07 -0400)]
Plug another memory leak

Also found by valgrind.

11 years agoPlug some memory leaks in GL support
Matthias Clasen [Tue, 28 Oct 2014 20:06:42 +0000 (16:06 -0400)]
Plug some memory leaks in GL support

valgrind pointed these out.

11 years agoGdkGlContextWayland: Don't require specific bit depths
Alexander Larsson [Tue, 28 Oct 2014 17:29:02 +0000 (18:29 +0100)]
GdkGlContextWayland: Don't require specific bit depths

This just means we may fail to get a gl context, we just require
*some* color depth.

11 years agoPick the first rgba visual, not the last
Alexander Larsson [Tue, 28 Oct 2014 17:27:41 +0000 (18:27 +0100)]
Pick the first rgba visual, not the last

The visuals are typically sorted by some sort of "most useful first"
order. And picking the last one is likely to give us the weirdest
matching glx visual.

11 years agoGdkGLContextX11: Ensure we get the fbconfig with the exact same visual
Alexander Larsson [Tue, 28 Oct 2014 15:43:38 +0000 (16:43 +0100)]
GdkGLContextX11: Ensure we get the fbconfig with the exact same visual

We really want a gl context with exactly the same visual, or we will
get a badmatch later, which hits us on nvidia as per:

https://bugzilla.gnome.org/show_bug.cgi?id=738670

11 years agoDocument Wayland opacity handling
Matthias Clasen [Tue, 28 Oct 2014 14:48:49 +0000 (10:48 -0400)]
Document Wayland opacity handling

11 years agowayland: Make window opacity work
Matthias Clasen [Tue, 28 Oct 2014 14:28:23 +0000 (10:28 -0400)]
wayland: Make window opacity work

Under wayland, the compositor doesn't have a 'overall window alpha'
knob, we just need to add the alpha to the buffers we send.
Client-side alpha, if you want to call it that.

Implement this by reusing the existing alpha support for non-toplevel
widgets. As a side-effect of the implementation, windows with RGBA
visual under X will now also use per-pixel alpha, instead of
overall alpha.

11 years agoBump atk dep
Matthias Clasen [Tue, 28 Oct 2014 12:08:49 +0000 (08:08 -0400)]
Bump atk dep

Needed for ATK_STATE_HAS_TOOLTIP.

11 years agoInspector: Make picking work without a grab
Matthias Clasen [Tue, 28 Oct 2014 11:04:23 +0000 (07:04 -0400)]
Inspector: Make picking work without a grab

Turns out Weston takes an X grab while delivering button events.
Thus, trying to take a grab in response to a button press is
futile.

11 years agowayland: Don't use the default display
Jasper St. Pierre [Tue, 28 Oct 2014 04:44:48 +0000 (21:44 -0700)]
wayland: Don't use the default display

Pass a display in so that multi-display technology works.

11 years agogdkevents: Use the correct display to copy event data
Jasper St. Pierre [Tue, 28 Oct 2014 05:29:29 +0000 (22:29 -0700)]
gdkevents: Use the correct display to copy event data

11 years agogdkdisplay: Provide a default event_data_copy / event_data_free
Jasper St. Pierre [Tue, 28 Oct 2014 04:47:58 +0000 (21:47 -0700)]
gdkdisplay: Provide a default event_data_copy / event_data_free

Every single implementation but Quartz is a no-op for this, so just
provide it once rather than in every backend.

11 years agogtk-demo: Drop uses of gdk_cursor_new()
Matthias Clasen [Tue, 28 Oct 2014 04:56:46 +0000 (00:56 -0400)]
gtk-demo: Drop uses of gdk_cursor_new()

Use gdk_cursor_new_for_display() instead.

11 years agoAdd another multi-device invariant
Matthias Clasen [Tue, 28 Oct 2014 04:54:39 +0000 (00:54 -0400)]
Add another multi-device invariant

The device and window passed to gdk_device_grab() must be
on the same display, or things are unlikely to work.
Document and assert this.

11 years agoDrop an unused variable
Matthias Clasen [Tue, 28 Oct 2014 04:53:59 +0000 (00:53 -0400)]
Drop an unused variable

11 years agoDon't return GDK_GRAB_SUCCESS on failure
Matthias Clasen [Tue, 28 Oct 2014 04:51:32 +0000 (00:51 -0400)]
Don't return GDK_GRAB_SUCCESS on failure

That seems ... counterproductive.

11 years agoMention the 'same display' requirement in the docs too
Matthias Clasen [Tue, 28 Oct 2014 04:44:33 +0000 (00:44 -0400)]
Mention the 'same display' requirement in the docs too